<?php 
include '../include/init.php';
include '../include/common.fun.php';
include '../include/mysql.config.php';
islogin();
include '../data/admin_data.php';

$current = isset($_GET['page'])?$_GET['page']+0:1;
$sql = "SELECT COUNT(*) AS count FROM wd_service";
$service_count = $db->getOne($sql);
$count = $service_count['count'];
$limit = 6;
$start = ($current-1)*$limit;

$page = new Page($current,$count,$limit,5);
$page_link = $page->first()->prev()->num()->next()->show();

$sql = "SELECT service_id,service_title,service_addtime FROM wd_service ORDER BY service_order DESC,service_addtime DESC LIMIT $start,$limit";
$service = $db->getAll($sql);
// dump($service);


include "view/service_list.php";
